package com.party.system.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.party.business.domain.ZqType;
import com.party.business.mapper.ZqTypeMapper;
import com.party.business.service.IZqTypeService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 专区Service业务层处理
 *
 * @author ruoyi
 * @date 2025-01-03
 */
@Service
public class ZqTypeServiceImpl extends ServiceImpl<ZqTypeMapper, ZqType>  implements IZqTypeService
{
    @Autowired
    private ZqTypeMapper zqTypeMapper;

    /**
     * 查询专区
     *
     * @param id 专区主键
     * @return 专区
     */
    @Override
    public ZqType selectZqTypeById(String id)
    {
        return zqTypeMapper.selectZqTypeById(id);
    }

    /**
     * 查询专区列表
     *
     * @param zqType 专区
     * @return 专区
     */
    @Override
    public List<ZqType> selectZqTypeList(ZqType zqType)
    {
        return zqTypeMapper.selectZqTypeList(zqType);
    }

    /**
     * 新增专区
     *
     * @param zqType 专区
     * @return 结果
     */
    @Override
    public int insertZqType(ZqType zqType)
    {
                zqType.setCreateTime(DateUtils.getNowDate());
            return zqTypeMapper.insertZqType(zqType);
    }

    /**
     * 修改专区
     *
     * @param zqType 专区
     * @return 结果
     */
    @Override
    public int updateZqType(ZqType zqType)
    {
                zqType.setUpdateTime(DateUtils.getNowDate());
        return zqTypeMapper.updateZqType(zqType);
    }

    /**
     * 批量删除专区
     *
     * @param ids 需要删除的专区主键
     * @return 结果
     */
    @Override
    public int deleteZqTypeByIds(String[] ids)
    {
        return zqTypeMapper.deleteZqTypeByIds(ids);
    }

    /**
     * 删除专区信息
     *
     * @param id 专区主键
     * @return 结果
     */
    @Override
    public int deleteZqTypeById(String id)
    {
        return zqTypeMapper.deleteZqTypeById(id);
    }
}
